package com.spark.lola.logistics.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.spark.lola.support.common.constant.CommonConstant;
import com.spark.lola.support.mybatis.entity.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;

/**
 * @author: Zhi-peng wang
 * @date: 2020/05/25 21:07
 **/
@Getter
@Setter
@NoArgsConstructor
@ApiModel(value = "Message", description = "消息")
@TableName("ryd_message")
public class Message extends BaseModel {

    @ApiModelProperty(name = "userId", value = "用户id")
    private Long userId;

    @ApiModelProperty(name = "title", value = "标题")
    private String title;

    @ApiModelProperty(name = "content", value = "内容")
    private String content;

    @ApiModelProperty(name = "isRead", value = "是否已读（N-否，Y-是）")
    private String used = CommonConstant.N;

    @ApiModelProperty(name = "createTime", value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    public Message(Long userId, String title, String content) {
        this.userId = userId;
        this.title = title;
        this.content = content;
    }
}
